package dao

import (
	"go-init/lib/cache"
	"go-init/lib/config"

	"github.com/go-redis/redis/v7"
)

var RedisClient *redis.Client

func newcache(key string) *cache.Cache {
	rc, err := cache.New(key, &redis.Options{
		Addr:     config.Config.Redis.Addr,
		Password: config.Config.Redis.Password,
		DB:       0,
	})
	if err != nil {
		panic(err)
	}
	return rc
}
